package com.sun.test.dao;

import com.sun.test.domain.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.RequestBody;


@Mapper
public interface UserDao {

    User getByUserId(@Param("userId")String userId);

    /**
     * 新增用户
     * @param user 入参
     */
    @Transactional(rollbackFor = Exception.class)
    void insert(@RequestBody User user);

}
